
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>


<?php
echo '<table border="1">';
echo '<tr>';
echo '<th>Name: </th>';
echo '<th>Rating: </th>';
echo '</tr>';
if($query->num_rows() >0){

  foreach($query->result() as $row){ 
	 $id = $row->id;
	 $link = site_url("spot_controller/display_spot/$id");
	 //$seg = array('spot_controller','display_spot','$id');
	 echo "<tr>";
	 
	 echo "<td><a href = \"http://scawesomespots.com/CI/index.php/spot_controller/display_spot/".$id."\">".$row->name."</a></td>";

	 echo "<td>$row->rating</td>";
	 echo "</tr>";

	}
}

?>

</body>
</html>









}